package state;

/**
 * 设计模式: 状态模式
 */
public class TestMethod {

    public static void main(String[] args) {
        Work w = new Work();
        w.setHour(8);
        w.writeProgram();
        w.setHour(10);
        w.writeProgram();
        w.setHour(12);
        w.writeProgram();
        w.setHour(13);
        w.writeProgram();
        w.setHour(14);
        w.writeProgram();
        w.setHour(17);
        w.setFinish(false);
        w.writeProgram();

        w.setHour(19);
        w.writeProgram();
        w.setHour(22);
        w.writeProgram();

    }
}
